package com.hx.springboot1.service.impl;

import com.hx.springboot1.dao.MajorDao;
import com.hx.springboot1.pojo.entity.TabMajor;
import com.hx.springboot1.service.MajorService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Author: hx
 * Date: 2021-05-23 16/26
 * Description: Nothing else
 */
@Service
@Slf4j
public class MajorServiceImpl implements MajorService {
    @Autowired
    MajorDao majorDao;
    @Override
    public List<TabMajor> selectAllMajor() {
        return majorDao.selectAllMajor();
    }

    @Override
    public List<TabMajor> selectCollegeMajor(Integer collegeId) {
        if (collegeId!=null){
            return majorDao.selectCollegeMajor(collegeId);
        }
        return null;
    }
}
